Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Aug 2008 15:11:56 -0400
From:      gnn@freebsd.org
To:        net@freebsd.org
Subject:   Small patch to multicast code...
Message-ID:  <m27iaa6v43.wl%gnn@neville-neil.com>

next in thread | raw e-mail | index | archive | help
Hi,

Turns out there is a bug in the code that loops back multicast
packets.  If the underlying device driver supports checksum offloading
then the packet that is looped back, when it is transmitted on the
wire, is incorrect, due to the fact that the packet is not fully
copied.

Here is a patch.  Comments welcome.

Best,
George

Index: ip_output.c
===================================================================
--- ip_output.c	(revision 181731)
+++ ip_output.c	(working copy)
@@ -1135,7 +1135,7 @@
 	register struct ip *ip;
 	struct mbuf *copym;
 
-	copym = m_copy(m, 0, M_COPYALL);
+	copym = m_dup(m, M_DONTWAIT);
 	if (copym != NULL && (copym->m_flags & M_EXT || copym->m_len < hlen))
 		copym = m_pullup(copym, hlen);
 	if (copym != NULL) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m27iaa6v43.wl%gnn>